package com.tech.arno.spicy.mvp.presenterImpl;

import android.widget.TextView;

import com.tech.arno.spicy.mvp.presenter.MyPhotoPresenter;
import com.tech.arno.spicy.mvp.view.MyPhotoView;

/*
*   @package:     com.tech.arno.spicy.mvp.presenterImpl
*   @fileName:    MyPhotoPresenterImpl
*   @author:    ArnoFrost
*   @date:  2017/12/22 0022 8:35
*   @desc:     大图浏览Presenter实现
*/

public class MyPhotoPresenterImpl implements MyPhotoPresenter {
    MyPhotoView myPhotoView;

    public MyPhotoPresenterImpl(MyPhotoView myPhotoView) {
        this.myPhotoView = myPhotoView;
    }

    @Override
    public void setIndicatorText(TextView textView, int position, int length) {
        textView.setText(String.valueOf((position + 1)).concat("/").
                concat(String.valueOf(length)));
    }

    @Override
    public void onDestory() {
        myPhotoView = null;
    }
}
